package com.jingwu.example.service;

import com.jingwu.example.pojo.entity.UserDO;
import com.jingwu.example.repository.UserRepository;
import javax.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @author 菁芜
 * @since 2021/11/20 - 14:56
 */
@Slf4j
@Service
public class UserService {

    @Resource
    private UserRepository repository;

    public UserDO getUser(Integer id) {
        log.info("方法被调用");
        return repository.selectById(id);
    }

    public void setRepository(UserRepository repository) {
        this.repository = repository;
    }
}
